//主从表tab选项卡标志位
var AF8DA3_Tab_Flag = -1;
//选择某一行
var AF8DA3_select_t_db_config_rowId = "";
//按钮事件新增或编辑
var AF8DA3_type = "";
//其他页面传到本页面参数
var AF8DA3_param = {};
//table选中数据，如无则默认第一条
var AF8DA3_rowCheckData = null;
//当前触发按钮
var AF8DA3_btn = "";
//上一次触发的按钮
var AF8DA3_prev_btn = "";
//表格数据服务端分页或客户端分页 1:服务端 0:客户端
var AF8DA3_table_page = 1;

/*定义查询条件变量*/
/*declare query param begin*/

/*declare query param end*/

/*定义下拉框集合定义*/
/*declare select options begin*/

/*declare select options end*/

/*绑定show监听事件*/
if(AF8DA3_Tab_Flag == -1){
	var AF8DA3_n = Get_RandomDiv("AF8DA3","");
	$(AF8DA3_n).bind("show", function(objTag){
		AF8DA3_Adjust_Sub_Sequ();
		if(!$(AF8DA3_n).is(":hidden") && AF8DA3_Tab_Flag > 0 && ("#"+objTag.currentTarget.id.toString()) == AF8DA3_n)
			AF8DA3_adjust_tab();		
	});
}

//设置主从表div顺序
function AF8DA3_Adjust_Sub_Sequ(){
	var temSubDivs = $("#content-main").find("div[data-id]");
	var MainDiv = $(Get_RandomDiv("AF8DA3",""));
	for(i = 0; i < temSubDivs.length; i++) {
		if(AF8DA3_Is_Sub_Div(temSubDivs[i].id)){
			$(temSubDivs[i]).before($(MainDiv));
			break;
		}
	}
}

//主从表传递参数
function AF8DA3_param_set(){
	/*Main Subsuv Table Param Begin*/
	
	/*Main Subsuv Table Param end*/
}

//业务逻辑数据开始
function AF8DA3_t_db_config_biz_start(inputparam) {
	layer.close(ly_index);
	AF8DA3_param = inputparam;
	//主从表传递参数
	AF8DA3_param_set();	
    /*biz begin*/
	
    AF8DA3_init_t_db_config()	
    /*biz end*/
}

/*业务函数步骤*/
/*biz step begin*/

/*biz step end*/

/*查找框函数*/
/*find qry fun begin*/

/*find qry fun end*/

/*页面结束*/
function AF8DA3_page_end(){
	page_btn_priv("AF8DA3");
	AF8DA3_adjust_tab();
}

//按钮弹窗
window.AF8DA3_Upd_EvaEvents = {'click #AF8DA3_btn_Upd': function (e, value, row, index) {
		AF8DA3_prev_btn = "";
		AF8DA3_select_t_db_config_rowId = index.toString();
		AF8DA3_btn = "AF8DA3_btn_t_db_config_edit";
	}
	,'click #AF8DA3_btn_Del': function (e, value, row, index){
		AF8DA3_prev_btn = "";
		AF8DA3_select_t_db_config_rowId = index.toString();
		AF8DA3_btn = "AF8DA3_btn_t_db_config_delete";
	}
	//按钮事件
	/*table button events begin*/

	/*table button events end*/
};

//按钮定义
function AF8DA3_Upd_EvaFormatter(value, row, index) {
	var btnHtml = "<div style=\"display: block;\">"
	btnHtml += "<button id=\"AF8DA3_btn_Upd\" class=\"btn btn-warning btn-edit\" ><strong><i class=\"fa fa-edit\"></i>修改</strong></button>";
	btnHtml += "&nbsp;<button id=\"AF8DA3_btn_Del\" class=\"btn btn-danger btn-del\" ><strong><i class=\"fa fa-remove\"></i>删除</strong></button>";
	/*table button defined begin*/
	
	/*table button defined end*/
	btnHtml += "</div>";
	return [btnHtml].join();
}

//数据源配置2显示列定义
var AF8DA3_t_db_config = [
	{ 
		checkbox:true
	},
	/*table column begin*/

    {
        title: '主键',
        field: 'MAIN_ID',
        sortable: true,
        visible: false
    },
    {
        title: '子系统名称',
        field: 'DB_CN_NAME',
        sortable: true
        ,formatter: set_s_decode
    },
    {
        title: '子系统驱动',
        field: 'DB_DRIVERCLASSNAME',
        sortable: true
        ,formatter: set_s_decode
    },
    {
        title: '子系统url',
        field: 'DB_URL',
        sortable: true
        ,formatter: set_s_decode
    },
    {
        title: '子系统登录账号',
        field: 'DB_USERNAME',
        sortable: true
        ,formatter: set_s_decode
    },
    {
        title: '子系统登录密码',
        field: 'DB_PASSWORD',
        sortable: true
        ,formatter: set_s_decode
    },
    {
        title: '子系统版本',
        field: 'DB_VERSION',
        sortable: true
        ,formatter: set_s_decode
    },
    {
        title: '子系统编码',
        field: 'DB_CODE',
        sortable: true
        ,formatter: set_s_decode
    },
    {
        title: '备注',
        field: 'S_DESC',
        sortable: true
        ,formatter: set_s_decode
    },
    {
        title: '系统时间',
        field: 'CREATE_DATE',
        sortable: true
        ,formatter: set_time_decode
    },
    {
        title: '排序',
        field: 'S_SORT',
        sortable: true
    },
    {
        title: '操作',
        sortable: true,
        events: AF8DA3_Upd_EvaEvents,
        formatter: AF8DA3_Upd_EvaFormatter
    }
	/*table column end*/
];

//页面初始化
function AF8DA3_init_t_db_config() {
	$(window).resize(function () {
		  $('#AF8DA3_t_db_config_Events').bootstrapTable('resetView');
	});
	//数据源配置2查询条件初始化设置
	/*query conditions init begin*/
	
    /*query conditions init end*/
	
	$('#AF8DA3_btn_t_db_config_query').click();
}

//查询接口
function AF8DA3_t_db_config_query() {
    $('#AF8DA3_t_db_config_Events').bootstrapTable("removeAll");
	//以下为特殊字段列表查询，无特殊字段时不需要
	var inputdata = {
		"param_name": "N01_sel_t_db_config",
		"session_id": session_id,
		"login_id": login_id
		/*传递查询条件变量*/
        /*get query param begin*/
		
        /*get query param end*/
	};
	ly_index = layer.load();
	if(AF8DA3_table_page == 1){
		inputdata = {"N01_sel_t_db_config":[]};
		AF8DA3_get_N01_sel_t_db_config(inputdata);
	}
	else{
		delete inputdata["pageNumber"];
		delete inputdata["pageSize"];
		get_ajax_baseurl(inputdata, "AF8DA3_get_N01_sel_t_db_config");
	}
}

//查询结果
function AF8DA3_get_N01_sel_t_db_config(input) {
	layer.close(ly_index);
	//查询失败
    if (Call_QryResult(input.N01_sel_t_db_config) == false)
        return false;
    AF8DA3_rowCheckData = null;
    //调整table各列宽度
    $.each(AF8DA3_t_db_config, function (i, obj) {
		if(obj.title != undefined){
			obj.width = obj.title.length * 14 + 37;
		}
	});
    
	var s_data = input.N01_sel_t_db_config;
    AF8DA3_select_t_db_config_rowId = "";
    if(s_data.length > 0){
    	AF8DA3_rowCheckData = s_data[0]; 
    }
    //table对应的属性
    var temTableAtt = {};
    if(AF8DA3_table_page == 1){
    	temTableAtt["url"] = bizzUrl;
    	temTableAtt["method"] = "get";
    	temTableAtt["sidePagination"] = "server";
    	temTableAtt["queryParamsType"] = "limit";
    }
    else{
    	temTableAtt["url"] = null;
    	temTableAtt["method"] = null;
    	temTableAtt["sidePagination"] = null;
    	temTableAtt["queryParamsType"] = null;
    }
    $('#AF8DA3_t_db_config_Events').bootstrapTable('destroy');
    $("#AF8DA3_t_db_config_Events").bootstrapTable({
        uniqueId: 'main_id',
        search: !0,
        pagination: !0,
        showRefresh: !0,
        showToggle: !0,
        locale: "zh-CN",
        showColumns: !0,
        showExport: !0,
        exportDataType:"all",
        exportTypes:['excel'],
        iconSize: "outline",
        onClickRow: function (row, $element) {
            // 判断是否已选中
            if (AF8DA3_prev_btn == AF8DA3_btn && $($element).hasClass("changeColor")) {
                $('#AF8DA3_t_db_config_Events').find("tr.changeColor").removeClass('changeColor');
                AF8DA3_select_t_db_config_rowId = "";
            }
            else {
                // 未点击则，为当前行添加 class='changeColor'
                $('#AF8DA3_t_db_config_Events').find("tr.changeColor").removeClass('changeColor');
                $($element).addClass('changeColor');                　
                AF8DA3_select_t_db_config_rowId = $element.attr('data-index');
                
                //设置子表查询条件
                /*set child table qry begin*/
                
                $($("#AF8DA3_TAB_MAIN").find(".active")[0]).click();
                /*set child table qry end*/
                //判断是否button按钮点击事件
        		if(typeof($("#AF8DA3_TAB_MAIN").find(".active")[0]) == "undefined" && AF8DA3_prev_btn != AF8DA3_btn){
        			AF8DA3_prev_btn = AF8DA3_btn;
        			if($("#"+AF8DA3_btn)[0] == undefined)
        				eval(AF8DA3_btn + "()");
        			else
        				$("#"+AF8DA3_btn).click();
        		}
            }
        },
		onDblClickRow: function (row){
			if(AF8DA3_param.hasOwnProperty("target_name"))
			{
				$("#"+AF8DA3_param["target_id"]).val(eval("row."+AF8DA3_param["sourc_id"].toUpperCase()));
				$("#"+AF8DA3_param["target_name"]).val(s_decode(eval("row."+AF8DA3_param["sourc_name"].toUpperCase())));				
				layer.close(AF8DA3_param["ly_index"]);
			}
		},
        toolbar: "#AF8DA3_t_db_config_Toolbar",
        url: temTableAtt["url"],
        method: temTableAtt["method"],
        height:500,
        columns: AF8DA3_t_db_config,
        data: s_data,
        pageNumber: 1,
        pageSize: 10, // 每页的记录行数（*）
        pageList: [10,50,100,1000,2000], // 可供选择的每页的行数（*）
        queryParams: AF8DA3_t_db_config_queryParams,
        sidePagination: temTableAtt["sidePagination"],//"server", //服务端处理分页
	    queryParamsType : temTableAtt["queryParamsType"],//"limit",//设置为 ‘limit’ 则会发送符合 RESTFul 格式的参数.
        icons: {
            refresh: "glyphicon-repeat",
            toggle: "glyphicon-list-alt",
            columns: "glyphicon-list"
        },
        onPostBody:function(){
        },
        onLoadSuccess: function(input){
        	if(input.rows.length > 0)
        		AF8DA3_rowCheckData = input.rows[0]; 
        },
        onLoadError: function(err){
            console.log("error: "+err);
        },
        responseHandler:AF8DA3_Res_N01_sel_t_db_config
    });
	AF8DA3_page_end();
}

//设置参数
function AF8DA3_t_db_config_queryParams(inputdata){
	ly_index = layer.load();
	if(AF8DA3_table_page == 0)
		return null;
	var temdata = {
		"param_name": "N01_sel_t_db_config",
		"session_id": session_id,
		"login_id": login_id
		/*传递查询条件变量*/
        /*get query param begin*/
        /*get query param end*/
	};	
	for (var key in temdata) {
		inputdata[key] = temdata[key];
    }
	if(inputdata.hasOwnProperty("offset") && inputdata.hasOwnProperty("limit")){
		inputdata["pageNumber"] = parseInt(inputdata["offset"] / inputdata["limit"]) + 1;
		inputdata["pageSize"] = inputdata["limit"];
	}
	else{
		inputdata["pageNumber"] = 0;
		inputdata["pageSize"] = 0;
	}
	return inputdata;
}

//获取接口数据
function AF8DA3_Res_N01_sel_t_db_config(input){
	layer.close(ly_index);
	//查询失败
    if (Call_QryResult(input.N01_sel_t_db_config) == false)
        return false;
    if(input["N01_sel_t_db_config"].length > 0)
    	AF8DA3_rowCheckData = input["N01_sel_t_db_config"][0];
    if(AF8DA3_table_page == 0)
		return null;
	else{ 
		var json_list = {};
		json_list["total"] = input["N01_sel_t_db_config_ROWS"];
		json_list["rows"] = input["N01_sel_t_db_config"];
		return json_list;
	}
}

//刷新按钮
$('#AF8DA3_btn_t_db_config_refresh').click(function () {
	/*重置查询条件变量*/
	/*refresh query param begin*/

	/*refresh query param end*/

	/*重置下拉框集合定义*/
	/*refresh select options begin*/

	/*refresh select options end*/
	
	/*页面重置重新加载*/
	/*biz begin*/

    AF8DA3_init_t_db_config()	
    /*biz end*/
})

//查询按钮
$('#AF8DA3_btn_t_db_config_query').click(function () {
	/*设置查询条件变量*/
    /*set query param begin*/
	
    /*set query param end*/
	AF8DA3_t_db_config_query();
})

//vue回调
function AF8DA3_t_db_config_call_vue(objResult){
	//选择某条记录或自动选择第一条
	if (AF8DA3_select_t_db_config_rowId != "") 
		AF8DA3_rowCheckData = $("#AF8DA3_t_db_config_Events").bootstrapTable('getData')[AF8DA3_select_t_db_config_rowId];
	
	if(index_subhtml == "t_db_config_$.vue")
	{
		var n = Get_RandomDiv("BF8DA3",objResult);	
		layer.open({
			type: 1,
	        area: ['1100px', '600px'],
	        fixed: false, //不固定
	        maxmin: true,
	        content: $(n),
	        success: function(layero, index){
				var inputdata = {"type":AF8DA3_type,"ly_index":index};
				if(AF8DA3_param.hasOwnProperty("hidden_find")){
					inputdata["hidden_find"] = "1";
				}				
				/*查询条件参数传递至子页面,初次加载*/
				/*Send One FindSelect param bgein*/
					
				/*Send One FindSelect param end*/
				
	        	loadScript_hasparam("dev_vue/t_db_config_$.js","BF8DA3_t_db_config_biz_start",inputdata);
	        },
			end: function(){
				$(n).hide();
			}
	    });
	}
	/*查询条件弹窗子页面*/
    /*get find subvue bgein*/
	
	/*get find subvue end*/
	
	/*tab页显示子页面*/
	/*get tab subvue begin*/

	/*get tab subvue end*/
	else if(index_subhtml == "dev_vue/set_import_table.vue"){
    	var n = Get_RandomDiv("A887N2",objResult);	
		layer.open({
			type: 1,
	        area: ['800px', '400px'],
	        fixed: false, //不固定
	        maxmin: true,
	        content: $(n),
	        success: function(layero, index){
	        	inputdata = {"TB_NAME":"t_db_config","DB_ID":"1"};
	        	loadScript_hasparam("dev_vue/set_import_table.js","A887N2_set_biz_start",inputdata);
	        },
			end: function(){
				$(n).hide();
			}
	    });
    }
	
	//判断是否button按钮点击事件
	if(AF8DA3_prev_btn != AF8DA3_btn){
		AF8DA3_prev_btn = AF8DA3_btn;
		$("#"+AF8DA3_btn).click();
	}
}

//新增按钮
$("#AF8DA3_btn_t_db_config_add").click(function () {
	AF8DA3_type = "add";
	index_subhtml = "t_db_config_$.vue";
	if(loadHtmlSubVueFun("dev_vue/t_db_config_$.vue","AF8DA3_t_db_config_call_vue") == true){
		var n = Get_RandomDiv("BF8DA3","");
		layer.open({
			type: 1,
			area: ['1100px', '600px'],
			fixed: false, //不固定
			maxmin: true,
			content: $(n),
			success: function(layero, index){
				BF8DA3_param["type"] = AF8DA3_type;
				BF8DA3_param["ly_index"]= index;
				if(AF8DA3_param.hasOwnProperty("hidden_find")){
					BF8DA3_param["hidden_find"] = "1";
				}
				/*查询条件参数传递至子页面,再次加载*/
			    /*Send Two FindSelect param bgein*/
				
				/*Send Two FindSelect param end*/

				BF8DA3_clear_edit_info();
			},
			end: function(){
				BF8DA3_clear_validate();
				$(n).hide();
			}
		});
	}
})

//编辑按钮
$("#AF8DA3_btn_t_db_config_edit").click(function () {
	if (AF8DA3_select_t_db_config_rowId != "") {
		AF8DA3_type = "edit";
		index_subhtml = "t_db_config_$.vue";
		if(loadHtmlSubVueFun("dev_vue/t_db_config_$.vue","AF8DA3_t_db_config_call_vue") == true){
			var n = Get_RandomDiv("BF8DA3","");
			layer.open({
				type: 1,
				area: ['1100px', '600px'],
				fixed: false, //不固定
				maxmin: true,
				content: $(n),
				success: function(layero, index){
					BF8DA3_param["type"] = AF8DA3_type;
					BF8DA3_param["ly_index"] = index;
					if(AF8DA3_param.hasOwnProperty("hidden_find")){
						BF8DA3_param["hidden_find"] = "1";
					}
					BF8DA3_clear_edit_info();
					BF8DA3_get_edit_info();
				},
				end: function(){
					BF8DA3_clear_validate();
					$(n).hide();
				}
			});
		}
	} else {
		swal({
            title: "提示信息",
            text: "无法修改记录，请选择正确记录修改!"
        });
    }
})

//删除按钮
$('#AF8DA3_btn_t_db_config_delete').click(function () {
	//单行选择
	var rowData = $("#AF8DA3_t_db_config_Events").bootstrapTable('getData')[AF8DA3_select_t_db_config_rowId];
	//多行选择
	var rowDatas = AF8DA3_sel_row_t_db_config();
	if (AF8DA3_select_t_db_config_rowId != "" || rowDatas.length > 0) {
    	swal({
            title: "告警",
            text: "确认要删除吗?删除数据将无法恢复!",
            type: "warning",
            showCancelButton: true,
            confirmButtonColor: "#DD6B55",
            confirmButtonText: "确定",
            closeOnConfirm: false
        },
		function () {
        	if(rowDatas.length > 0)
        	{
        		var delete_main_id = "";
	        	$.each(rowDatas, function (i, obj) {
	        		delete_main_id = delete_main_id + obj.MAIN_ID + ",";
	        	});
	        	delete_main_id = delete_main_id.substring(0,delete_main_id.lastIndexOf(","));
				var inputdata = {
						"param_name": "N01_del_t_db_config",
						"session_id": session_id,
						"login_id": login_id,
						"param_value1": delete_main_id
				};
				ly_index = layer.load();
				get_ajax_staticurl(inputdata, "AF8DA3_N01_del_t_db_config");
        	}
        	else
        	{
        		var delete_main_id = rowData["MAIN_ID"];
				var inputdata = {
					"param_name": "N01_del_t_db_config",
					"session_id": session_id,
					"login_id": login_id,
					"param_value1": delete_main_id
				};
				ly_index = layer.load();
				get_ajax_baseurl(inputdata, "AF8DA3_N01_del_t_db_config");
        	}
		}); 
    } else {
    	swal({
            title: "提示信息",
            text: "无法删除记录，请选择正确记录删除!"
        });
    }
})

//导出json格式数据接口
$('#AF8DA3_load_out_t_db_config').click(function () {
	//单行选择
	var rowData = $("#AF8DA3_t_db_config_Events").bootstrapTable('getData')[AF8DA3_select_t_db_config_rowId];
	//多行选择
	var rowDatas = AF8DA3_sel_row_t_db_config();
	//选中的主键集字符串
	var MAIN_IDS = "";
	if(rowDatas.length > 0){
    	$.each(rowDatas, function (i, obj) {
    		MAIN_IDS = MAIN_IDS + obj.MAIN_ID + ",";
    	});
	}
	else if(typeof(rowData) != "undefined"){
		MAIN_IDS = rowData["MAIN_ID"];
	}
	Load_out_table("t_db_config",MAIN_IDS,"1");
});

//导入json格式数据接口
$('#AF8DA3_load_in_t_db_config').click(function () {
	index_subhtml = "dev_vue/set_import_table.vue";
	if(loadHtmlSubVueFun("dev_vue/set_import_table.vue","AF8DA3_t_db_config_call_vue") == true){
		var n = Get_RandomDiv("A887N2","");
		layer.open({
			type: 1,
			area: ['800px', '400px'],
			fixed: false, //不固定
			maxmin: true,
			content: $(n),
			success: function(layero, index){
				/*Send Two FindSelect param end*/
				inputdata = {"TB_NAME":"t_db_config","DB_ID":"1"};
				A887N2_Clear();
				A887N2_set_biz_start(inputdata);
			},
			end: function(){
				$(n).hide();
			}
		});
	}
});

//删除结果
function AF8DA3_N01_del_t_db_config(input) {
	layer.close(ly_index);
	if(Call_OpeResult(input.N01_del_t_db_config) == true)
		AF8DA3_t_db_config_query();
}

//主从表选项卡动态添加
function AF8DA3_adjust_tab(){
	if(typeof($("#AF8DA3_TAB_MAIN")[0]) != "undefined" && $("#AF8DA3_TAB_MAIN")[0].length != 0){
		AF8DA3_Tab_Flag = 1;
		$(Get_RDivNoBuild("AF8DA3","")).find(".wrapper-content").css("padding","20px 20px 0px 20px");
		$(Get_RDivNoBuild("AF8DA3","")).find(".ibox").css("margin-bottom","0px");
		$(Get_RDivNoBuild("AF8DA3","")).find(".ibox-content").css("padding","15px 20px 0px");		
		$($("#AF8DA3_TAB_MAIN").find(".active")[0]).click();
	}
}

/*tab选项卡按钮点击事件*/
/*Tab Click Fun Begin*/

//隐藏tab页选项卡
function AF8DA3_hide_tab_fun(){
    var n = null;
}

//判断是否sub子项div页面
function AF8DA3_Is_Sub_Div(temDivId){
    if(temDivId.indexOf("XX$TTT") == 0)
        return false;
    return false;
}

/*Tab Click Fun End*/

function AF8DA3_show_tab_fun(inputUrl,inputrandom,temPar){
	index_subhtml = inputUrl;
	random_subhtml = inputrandom;
	if(loadHtmlSubVueFun("dev_vue/"+inputUrl,"AF8DA3_t_db_config_call_vue") == true){
		var n = Get_RandomDiv(inputrandom,"");
		$(n).show();
		var rowData = null;
		//选择某条记录或自动选择第一条并传递参数
		if (AF8DA3_select_t_db_config_rowId != "") 
			rowData = $("#AF8DA3_t_db_config_Events").bootstrapTable('getData')[AF8DA3_select_t_proc_name_rowId];
		else
			rowData = AF8DA3_rowCheckData;
		//$("#AF8DA3_t_db_config_Events").bootstrapTable('getData')[0];
		if(rowData != null){
			var temFlag = true;
			$.each(temPar, function (i, obj) {
				if(eval(inputrandom+"_param.hasOwnProperty(\""+obj.target_id+"\")") && eval(inputrandom+"_param[\""+obj.target_id+"\"]").toString() == rowData[obj.sourc_id].toString())
					temFlag = false;
				else
					eval(inputrandom+"_param[\""+obj.target_id+"\"] = \""+rowData[obj.sourc_id]+"\"");
			});
			if(temFlag){
				//传递子页面隐藏find功能
				eval(inputrandom+"_param[\"hidden_find\"] = \"1\"");
				//参数传递并赋值
				eval(inputrandom+"_param_set()");
				var tbName = inputUrl.substring(0,inputUrl.indexOf(".vue"));		
				eval(inputrandom+"_"+tbName+"_biz_start("+inputrandom+"_param)");
			}
		}
		else{
			$.each(temPar, function (i, obj) {
				if(obj.sourc_id.toUpperCase() == "MAIN_ID")
					eval(inputrandom+"_param[\""+obj.target_id+"\"] = \"-999\"");
				else
					eval(inputrandom+"_param[\""+obj.target_id+"\"] = \"\"");
				return;
			});
			//传递子页面隐藏find功能
			eval(inputrandom+"_param[\"hidden_find\"] = \"1\"");
			//参数传递并赋值
			eval(inputrandom+"_param_set()");
			var tbName = inputUrl.substring(0,inputUrl.indexOf(".vue"));		
				eval(inputrandom+"_"+tbName+"_biz_start("+inputrandom+"_param)");
		}
		//判断是否button按钮点击事件
		if(AF8DA3_prev_btn != AF8DA3_btn){
			AF8DA3_prev_btn = AF8DA3_btn;
			$("#"+AF8DA3_btn).click();
		}
	}
}

//清除 查找框
function AF8DA3_clear_input_cn_name(obj1,obj2){
	$("#"+obj1).val("");
	$("#"+obj2).val("-1");
}

//选择多行数据进行业务操作
function AF8DA3_sel_row_t_db_config(){
	//获得选中行
	var checkedbox= $("#AF8DA3_t_db_config_Events").bootstrapTable('getSelections'); 
	//将选中行数据转成jsonStr
	var jsonStr=JSON.stringify(checkedbox);
	//将jsonStr转成jsonObject对象	 
	var jsonObject=jQuery.parseJSON(jsonStr);
	return jsonObject;
	//接着就可以遍历jsonObject数组对象，取出并操作数据
	//alert(jsonObject);
}
